package com.example.demo.controller;

import com.example.demo.entity.Company;
import com.example.demo.entity.CompanyMember;
import com.example.demo.entity.FunctionPoint;
import com.example.demo.entity.Project;
import com.example.demo.result.R;
import com.example.demo.result.Renum;
import com.example.demo.service.*;
import com.example.demo.utils.RUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.List;

@Controller
@RequestMapping("/CompanyMember")
public class CompanyMemberController {

    @Autowired
    CompanyMemberService companymemberService;


    @CrossOrigin
    @ResponseBody
    @RequestMapping("/getCompany")
    public List<Company> getUserCompany(Integer userId){
        return companymemberService.getUserCompany(userId);
    }
}
